home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-03 | 4.2 KB | 159 lines | [TEXT/CWIE] |
- //========================================================================================
- //
- // File: Commands.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef COMMANDS_H
- #define COMMANDS_H
-
- // ----- Framework Includes -----
-
- #ifndef FWCLPCMD_H
- #include "FWClpCmd.h"
- #endif
-
- #ifndef FWDRCMD_H
- #include "FWDrCmd.h"
- #endif
-
- #ifndef FWBNDSTR_H
- #include "FWBndStr.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class CFormContent;
-
- //========================================================================================
- // CFormEditCommand
- //========================================================================================
-
- class CFormEditCommand : public FW_CClipboardCommand
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
-
- FW_DECLARE_AUTO(CFormEditCommand)
-
- CFormEditCommand(Environment* ev,
- ODCommandID id,
- CFormContent* itsContent,
- FW_CFrame* frame);
-
- virtual ~CFormEditCommand();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void UndoIt(Environment *ev);
- virtual void RedoIt(Environment *ev);
- virtual void SaveUndoState(Environment *ev);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- private:
- void RemoveSelection(Environment* ev);
- void RestoreSelection(Environment* ev);
- void SwapSelection(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CFormContent* fFormContent;
- FW_CString255 fSavedTextData; // Saved data for undo/redo
- };
-
-
-
- //========================================================================================
- // class CFormDragCommand
- //========================================================================================
-
- class CFormDragCommand : public FW_CDragCommand
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
-
- FW_DECLARE_AUTO(CFormDragCommand)
-
- CFormDragCommand(Environment* ev,
- CFormContent* content,
- FW_CFrame* frame);
- virtual ~CFormDragCommand();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void UndoIt(Environment *ev);
- virtual void RedoIt(Environment *ev);
- virtual void SaveUndoState(Environment *ev);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CFormContent* fFormContent;
- FW_CString255 fSavedTextData; // Saved data for undo/redo
- };
-
- //========================================================================================
- // class CFormDropCommand
- //========================================================================================
-
- class CFormDropCommand : public FW_CDropCommand
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
-
- FW_DECLARE_AUTO(CFormDropCommand)
-
- CFormDropCommand(Environment *ev,
- CFormContent* content,
- FW_CFrame* frame,
- ODDragItemIterator* dropInfo,
- ODFacet* odFacet,
- const FW_CPoint& dropPoint);
-
- virtual ~CFormDropCommand();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void UndoIt(Environment *ev);
- virtual void RedoIt(Environment *ev);
- virtual void SaveUndoState(Environment *ev);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- private:
- void SwapSelection(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CFormContent* fFormContent;
- FW_CString255 fSavedTextData; // Saved data for undo/redo
- };
-
-
- #endif
-